[IA64] fix xencomm_handle_is_null().
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Fri, 10 Nov 2006 18:14:42 +0000 (11:14 -0700)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Fri, 10 Nov 2006 18:14:42 +0000 (11:14 -0700)
It checks only desc->address[0]. However xencomm_add_offset() may
sets XENCOMM_INVALID while there left consumable bytes.
In such a case xencomm_handle_is_null() returns true wrongly.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
xen/arch/ia64/xen/xencomm.c

index 8f6cec8cb763ad24ba7fbd7b1a2d40ddba1ff762..3b8e40b5b3e941c2ad98dbc36690fd6d80438bbc 100644 (file)
@@ -382,6 +382,6 @@ xencomm_handle_is_null(
             return 1;
 
         desc = (struct xencomm_desc *)desc_addr;
-        return (desc->address[0] == XENCOMM_INVALID);
+        return (desc->nr_addrs == 0);
     }
 }